<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%> 
  	
<div class="yeah-top" id="yeah-top">
    <div class="container">
        <div class="row">
            <div class="col-lg-12 col-xs-12 col-md-12 col-sm-12">
                <div class="yeah-top-left">
                    <i class="iconfont icon-ditu" style="color:red;"></i>
                    <span class="yeah-top-left-text">{{ state }}</span>
                    <span class="yeah-top-left-text" style="color:red;">[{{ city }}]</span>&nbsp;&nbsp;
                </div>
                <div class="yeah-top-right">&nbsp;
                    <span class="yeah-top-left-text">
                    <i id="iaa"></i>
                    <a href="user" id="aa">{{ user_name }}</a>
                    </span>&nbsp;&nbsp;
                    <span class="yeah-top-left-text"><a href="logout">{{ logout }}</a></span>&nbsp;&nbsp;
                    <span class="yeah-top-left-text"><a href="toEnterpriseback">企业回收</a></span>&nbsp;&nbsp;
                    <span class="yeah-top-left-text"><a href="order">订单中心</a></span>&nbsp;&nbsp;
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    var top_v = new Vue({
        el:'#yeah-top',
        data:{
            state:'四川省',
            city:'成都市',
            user_name :'登录',
            logout:''
        }
    })
  		var phone11=${user.phone}+"";
  		if(phone11!=""){
  			top_v.user_name= '个人中心';
  			top_v.logout='退出登录';
  		};
   /*  $.getScript('http://api.map.baidu.com/location/ip?ak=22ATRIGWZAX67hcWpMfonzF4G0gqHexv',function(data){
        top_v.state=data.content.address_detail.province + "省";
        top_v.city=data.content.address_detail.city +"市";
    }); */
    
    $.ajax({
        url:'http://api.map.baidu.com/location/ip?ak=22ATRIGWZAX67hcWpMfonzF4G0gqHexv',
        dataType:'jsonp',
        processData: false, 
        type:'get',
        success:function(data){
        	 top_v.state=data.content.address_detail.province;
             top_v.city=data.content.address_detail.city;
        }});
    
   /*  $(function(){
    	$("#aa").mouseover(function(){
        	if(phone11!=""){
      			top_v.user_name= "个人中心";
      		};
        });
        
    	 $("#aa").mouseleave(function(){
         	
         	if(phone11!=""){
       			top_v.user_name= "您好"+phone11;
       		};
         });
    	
    }); */
    
    
</script>